package com.example.yc23.demo.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.yc23.demo.pojo.Film;
import com.example.yc23.demo.service.FilmTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/admin/filmtype")
public class FilmTypeController {
    @Autowired
    private FilmTypeService filmTypeService;
    @GetMapping("/index")
    public String index(String key,Model model){

        Film film=filmTypeService.datas(key);
        model.addAttribute("film",film);
        return "admin/filmtype/index";
    }

}
